package graphicView;

import model.AnchorPoint;
import model.RelationshipImpl;

/**
 * Team EBE - Elite Bombard Elephants
 * 
 * RelationshipFactory generates the relationships for the project, using source
 * and destination for the anchor points of the relationship objects
 */
public class RelationshipFactory {
	private AnchorPoint src;
	private AnchorPoint dest;
	
	RelationshipFactory(){
		
	}
	
	/**
	 * setSrc sets the anchor point source of the relationship object
	 * 
	 * @param srcIn
	 *            passes in the anchor point source
	 */
	public void setSrc(AnchorPoint srcIn){
		src = srcIn;
	}
	
	/**
	 * setDest sets the anchor point destination of the relationship object
	 * 
	 * @param destIn
	 *            passes in the anchor point destination
	 */
	public void setDest(AnchorPoint destIn){
		dest = destIn;
	}
	
	/**
	 * buildRelationship helps to build the relationship object using the source
	 * and destination of the anchor points
	 * 
	 * @return RelationshipImpl returns the relationship object anchor points
	 */
	public RelationshipImpl buildRelationship(){
		return new RelationshipImpl(src, dest);
	}
	
}
